package com.example.zwl.controller;

import com.example.zwl.pojo.student;
import com.example.zwl.service.Studentservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class AddController {
    @Autowired
    Studentservice studentservice;
    @PostMapping("/add")
    public String add(student stu){
        studentservice.addstu(stu);
        return "redirect:/msg";
    }
}
